const mongoose = require('mongoose')
const dbUrl = 'mongodb://lzy:lzy9527@127.0.0.1:27001/shop'
module.exports = _ => {
  mongoose
    .connect(dbUrl, {
      useNewUrlParser: true,
      useUnifiedTopology: true,
      useCreateIndex: true,
    })
    .then(_ => console.log('数据库连接成功'))
    .catch(err => console.log(err, '数据库连接失败'))
}
